@(title:String)
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <script src="https://cdn.bootcss.com/angular.js/1.6.3/angular.min.js"></script>

    </head>
    <body >

        <div  ng-app="myApp" ng-controller="formCtrl" >
            <form novalidate>
                Name:<br>
                <input type="text" ng-model="user.name"><br>
                Password:<br>
                <input type="password" ng-model="user.password">
                <br>
                    Email:<br>
                    <input type="text" ng-model="user.email">
                    <br>
                    <br>
                <button ng-click="reset()">RESET</button>
                <button ng-click="commit()">Commit</button>
            </form>

            <p>form = {{user}}</p>
            <script>


                    var app = angular.module('myApp', []);
                    app.controller('formCtrl', function($scope,$http) {

                     //   $scope.user={name:"",password:"",email:""}
                        $scope.commit =  function(){
                            $http({
                            method: 'POST',
                            url: '/user/insert?=name='+$scope.user.name+"&password="+$scope.user.password+"&email="+$scope.user.email
                        }).then(function successCallback (success) {
                            alert(success)
                        },function errorCallback(error) {
                            alert(error)
                        })
                        }
                    });



            </script>
        </div>



    </body>
</html>